package com.crm.controller;

import cn.hutool.core.util.StrUtil;
import com.crm.annotation.AutoIdempotent;
import com.crm.service.IRedisCacheService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/6/416:32
 */
@RestController
@RequestMapping("/token")
public class ToKenController {

    @Resource
    private IRedisCacheService tokenService;


    @GetMapping("/get/token")
    public String getToken(){
        String token = tokenService.createToken();
        return token;
    }

    @AutoIdempotent
    @PostMapping("/test/Idempotence")
    public void testIdempotence() {
    }
}
